-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Selection Input] Refactor auto-complete system. #27389
Conversation
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit d889556. |
js_modules/dagster-ui/packages/ui-core/src/selection/__tests__/SelectionAutoComplete.test.ts
Dismissed
Show dismissed
Hide dismissed
794d7e3
to
b8b7551
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Left a few inline comments and nits but overall it seems solid 💯
...-ui/packages/ui-core/src/asset-selection/input/useAssetSelectionAutoCompleteProvider.oss.tsx
Show resolved
Hide resolved
js_modules/dagster-ui/packages/ui-core/src/asset-selection/input/util.ts
Outdated
Show resolved
Hide resolved
js_modules/dagster-ui/packages/ui-core/src/asset-selection/input/util.ts
Show resolved
Hide resolved
js_modules/dagster-ui/packages/ui-core/src/asset-selection/input/util.ts
Outdated
Show resolved
Hide resolved
...odules/dagster-ui/packages/ui-core/src/pipelines/useOpGraphSelectionAutoCompleteProvider.tsx
Show resolved
Hide resolved
js_modules/dagster-ui/packages/ui-core/src/selection/SelectionAutoCompleteProvider.tsx
Show resolved
Hide resolved
js_modules/dagster-ui/packages/ui-core/src/selection/SelectionInputAutoCompleteResults.tsx
Show resolved
Hide resolved
## Summary & Motivation The primary goal of this refactor is to decouple the auto-complete suggestion UI from the autocomplete visitor logic. Before: - Visitor hard coded the types of the suggestions - UI rendering was tightly coupled to those types - The types were too restrictive, they required all of the values to be strings but that doesn't work well for tags which have a key and a value. Encoding the tags as a string (eg: `"key"="value"`) created ambiguities, where we could not tell if the string was a tag of `{key: "key", value: "value"}` or a tag of `{key: "key"="value", value: undefined}`. After: - Rendering is encapsulated in the SelectionAutoCompleteProvider which is also responsible for making auto-complete suggestions and can handle both string and tag object types. ## How I Tested These Changes Existing jest test in SelectionAutocomplete.ts. + Manual testing in cloud and OSS.
Summary & Motivation
The primary goal of this refactor is to decouple the auto-complete suggestion UI from the autocomplete visitor logic.
Before:
"key"="value"
) created ambiguities, where we could not tell if the string was a tag of{key: "key", value: "value"}
or a tag of{key: "key"="value", value: undefined}
.After:
How I Tested These Changes
Existing jest test in SelectionAutocomplete.ts. + Manual testing in cloud and OSS.